/* =============整体框架样式============= */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    list-style-type: none;
}
::-webkit-scrollbar {
    display: none;        /* 隐藏滚动条 */
}
header {
    height: 50px;
    width: 100vw;
    padding: 0 10vw;
    background-color: #fff;
    color: #333;
    box-shadow: 0px 1px 8px 4px #0000008b;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: fixed;
    top: 0px;
    z-index: 1;
}
main {
    background-color: #eee;
    margin-top: 50px;
    padding: 0 10vw;
    display: flex;
    flex-direction: column;
}
footer {
    height: 50px;
    background-color: #333;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =============头部样式============= */
header h2 {
    color: red;
    margin-right: auto;
}
header p {
    margin-left: 15px;
}
header .user {
    color: red;
}
header .top {
    cursor: pointer;
}
header .top span {
    border: none;
    background-color: #ff4040;
    color: #fff;
    border-radius: 50%;
    height: 16px;
    width: 16px;
    margin: 1px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    display: none;
}
.top:hover {
    background-color: red;
    color: #fff;
}


/* =============秒杀区域样式============= */
.seckill {
    margin-top: 20px;
    background-color: white;
    box-shadow: 1px 1px 1px 1px #00000033;
}
.seckill .title {
    display: flex;
    flex-direction: row;
    height: 40px;
    padding: 0 10px;
    align-items: center;
    justify-content:flex-end;
}
/* 1.标题文本 */
.seckill .title h3 {
    margin-right: auto;
    color: red;
}
/* 2.秒杀倒计时 */
.seckill .title span {
    font-size: 12px;
    color: #666;
}
#h, #m, #s {
    font-size: 16px;
    font-weight: bold;
    background-color: #333;
    color: #fff;
}
.seckill ul {
    margin: 10px;
    height: 400px;
    display: flex;
    justify-self: flex-start;
}
.seckill ul li {
    border: 0.5px solid #aaa;
    margin: 5px;
    height: 380px;
}
/* 3.秒杀商品 */
.seckill ul li {
    flex: 1 1 220px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

.seckill ul li:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 商品图片 */
.seckill ul li img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* 商品名 */
.seckill ul li .name {
    margin: 12px 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    padding: 0 10px;
}

/* 价格区 */
.price-area {
    margin: 6px 0 12px;
    text-align: center;
}

.price-seckill {
    font-size: 20px;
    font-weight: 700;
    color: #ff4040;
}

.price-original {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* 抢购按钮 */
.seckill ul li button {
    width: 80%;
    margin: 0 0 16px;
    padding: 9px 0;
    border: none;
    color: #fff;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s;
}

.buy {
    background: linear-gradient(135deg, #ff6b6b, #ff4040);
}

.buy:hover {
    background: linear-gradient(135deg, #ff4040, #e60000);
}

.no-buy {
    background: linear-gradient(135deg, #302828, #352929);
}

.no-buy:hover {
    background: linear-gradient(135deg, #463a3a, #513f3f);
}
/* =============热门商品============= */
.hot {
    margin: 20px 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    border-radius: 6px;
}

.hot h3 {
    height: 40px;
    line-height: 40px;
    padding: 0 10px;
    color: #000;
}

.hot ul {
    margin: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot ul li {
    flex: 0 0 20%;
    max-width: 220px;
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.hot ul li:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.hot ul li img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.hot ul li .name {
    margin: 6px 10px;
    font-size: 14px;
    flex: 1 1 auto;
}
.hot ul li .price {
    margin: 0 10px 6px;
    font-size: 16px;
    font-weight: 600;
    color: #ff4040;
}

.hot ul li button {
    width: 50%;
    margin: 0 10px 10px;
    padding: 8px 0;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ff4040);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background .25s;
}
.hot ul li button:hover {
    background: linear-gradient(135deg, #ff4040, #e60000);
}